   // backend/server.js
   const express = require('express');
   const cors = require('cors');
   const multer = require('multer');
   const { transformExcel } = require('./transform/transform');
   const path = require("path");

   const app = express();
   const PORT = process.env.PORT || 5000;

   app.use(cors());
   app.use(express.json());
   app.use(express.static(path.join(__dirname, 'public')))
   const uploadedFolder = path.resolve(__dirname,"uploads");
   const upload = multer({ dest: uploadedFolder });

   app.post('/upload', upload.single('file'), transformExcel);

   app.listen(PORT, () => {
       console.log(`Server is running on http://localhost:${PORT}`);
   });
